﻿@model ShoppingCartModel
@using Nop.Core.Domain.Orders;
@using Nop.Web.Models.ShoppingCart;

<div class="order-summary @if (Model.IsEditable) {<text>editable</text>}">
    @Html.Widget("order_summary_content_before")

    @if (Model.Warnings.Count > 0)
    {
            <div class="message-error">
            
                <ul>
                    @for (int i = 0; i < Model.Warnings.Count; i++)
                    {
                        <li>@Model.Warnings[i]</li>
                    }
                </ul>
            </div>
        }
        @if (Model.AllItems.Count > 0)
        {
            <div class="cart-store-items">
                <table>
                    <thead>
                    <tr><th class="product-mobile-title"></th><th class="product-picture"><div>Products</div></th><th class="product-info"><div></div></th><th class="product-unit"><div>Unit Price</div></th><th class="product-qty"><div>Qty</div></th><th class="product-total"><div>Total</div></th><th class="product-mobile-attributes"></th>@if (Model.AllItems.Where(i => i.IsEditable == true).Count() > 0)
                    {<th></th>}</tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model.AllItems)
                        {
                            @Html.Partial("_CartItem", item);
                        }
                    </tbody>
                </table>
            </div>
        }

    @Html.Widget("order_summary_content_after")
    <div class="clear"></div>
</div>
